<!DOCTYPE html>
<script src="../../../../resources/testharness.js"></script>
<script src="../../../../resources/testharnessreport.js"></script>
<div id="dragme">Make Selection Here</div>
<div id="log"></div>
<script>
var dragme = document.getElementById('dragme');
test(function() {
    if (!window.eventSender)
        return;

    var x = dragme.offsetLeft + dragme.offsetWidth / 2;
    var y = dragme.offsetTop + dragme.offsetHeight / 2;

    // Longpress to create selection
    eventSender.gestureLongPress(x, y);

    eventSender.gestureTapDown(x, y);
    eventSender.gestureShowPress(x, y);
    eventSender.gestureTap(x, y);

    assert_true(window.getSelection().isCollapsed);
}, "This tests if the selection is reset after tapping of gesture.");
</script>
